import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:ytbusiness/config/style.dart';
import 'package:ytbusiness/page/repair_factory/accessories_query/accessories_center.dart';
import 'package:ytbusiness/utils/helper.dart';
import 'package:ytbusiness/utils/screen_adaptation.dart';

//配件信息
class AccessoriesInfo extends StatefulWidget {
  @override
  _AccessoriesInfoState createState() => _AccessoriesInfoState();
}

class _AccessoriesInfoState extends State<AccessoriesInfo> {
  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      child: CustomScrollView(
        slivers: [
          SliverToBoxAdapter(
            child: Container(
              height: setWidth(15),
              color: YTStyle.bgColor,
            ),
          ),
          SliverToBoxAdapter(
            child: Container(
              margin: EdgeInsets.only(top: setWidth(70)),
              alignment: Alignment.center,
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  Container(
                      width: setWidth(51),
                      height: setWidth(51),
                      child: Image.asset(
                        "assets/images/repair_car.png",
                        fit: BoxFit.cover,
                      )),
                  SizedBox(
                    height: setWidth(21),
                  ),
                  Container(
                    child: Text("暂无配件，请选择",style: TextStyle(color: Color(0xff323232),fontSize: setSp(15)),),
                  ),
                  GestureDetector(
                    onTap: (){
                      jump(context,widget: AccessoriesCenter(),name: "accessories_center");
                      },
                    child: Container(
                      margin: EdgeInsets.only(left: setWidth(15),right: setWidth(15),top: setWidth(63)),
                      decoration: BoxDecoration(
                        color: YTStyle.mainColor,
                        borderRadius: BorderRadius.circular(3)
                      ),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: [
                          Container(
                              margin: EdgeInsets.only(top: setWidth(15),bottom: setWidth(15)),
                              child: Text("选择配件",style: TextStyle(color: Colors.white,fontSize: setSp(15),),)),
                        ],
                      ),
                    ),
                  ),

                ],
              ),
            ),
          ),


        ],
      ),
    );
  }
}
